<?php

class register_m extends CI_Model {

    var $details;

    function register() {
        $this->load->library("form_validation");

        $query_str = array(
            'username' => $this->input->post('username'),
            'password' => md5($this->input->post('pass')),
            'gender' => $this->input->post('gender'),
            'email' => $this->input->post('email'),
            'phone' => $this->input->post('phone'),
            'address' => $this->input->post('address'),
            'role_id' => '2'
        );
        return $this->db->insert('user', $query_str);
    }

}
